package com.hua.pojo.securityUser;


import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * 用于给spring-security 保存用户信息
 * @author ONE-X
 * @date 2020/11/09
 */
public class SecurityUser extends User {

	private String ksUserId;

	public SecurityUser(String username, String password, Collection<? extends GrantedAuthority> authorities) {
		super(username, password, authorities);
	}
	public SecurityUser(String username, String password, Collection<? extends GrantedAuthority> authorities,String ksUserId) {
		super(username, password, authorities);
		this.ksUserId = ksUserId;
	}
	public SecurityUser(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
		super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
	}


	public String getKsUser() {
		return ksUserId;
	}
}
